// 用户管理路由
import Layout from '@/views/layout/Layout'

const userRouter = {
  path: '/user',
  component: Layout,
  name: 'User',
  redirect: '/user/usermanage',
  meta: {
    title: '用户',
    icon: 'form'
  },
  children: [{
    path: 'usermanage',
    name: 'Usermanage',
    component: () =>
      import('@/views/user/usermanage'),
    meta: {
      title: '用户管理',
      role: ['admin']
    }
  },
  {
    path: 'datamanage',
    name: 'Datamanage',
    component: () =>
      import('@/views/user/datamanage'),
    meta: {
      title: '用户数据统计'
    }
  },
  {
    path: 'detail',
    name: 'Detail',
    component: () =>
      import('@/views/user/detail'),
    meta: {
      title: '详情页'
    },
    hidden: true
  },
  {
    path: 'identification',
    name: 'Identification',
    component: () =>
      import('@/views/user/identification'),
    meta: {
      title: '实名认证管理'
    }
  },
  {
    path: 'teacher',
    name: 'Teacher',
    component: () =>
      import('@/views/user/teacher'),
    meta: {
      title: '教师管理'
    }
  },
  {
    path: 'viper',
    name: 'Viper',
    component: () =>
      import('@/views/user/viper'),
    meta: {
      title: '会员管理'
    }
  },
  {
    path: 'personalmsg',
    name: 'Personalmsg',
    component: () =>
      import('@/views/user/personalmsg'),
    meta: {
      title: '私信管理'
    }
  },
  {
    path: 'userinfo',
    name: 'Userinfo',
    component: () =>
      import('@/views/user/userinfo'),
    meta: {
      title: '用户详情'
    },
    hidden: true
  }
  ]
}
export default userRouter
